#!/bin/bash -e


# navigate to seisflows/tests
cd $(dirname ${BASH_SOURCE[0]})


WD="$PWD/setup/test_preprocess"


# adjust paths
sed -i "s:^DATA.*=.*:DATA = '$WD/data.su':" $WD/paths
sed -i "s:^SYNTHETICS.*=.*:SYNTHETICS = '$WD/synthetics.su':" $WD/paths


# run tests
sfsubmit --workdir=$WD --parameter_file=$WD/parameters --path_file=$WD/paths


# to preserve output for inspection, comment out next line
rm -rf $WD/output* $WD/scratch


